extends AbstractRewardStoreCollectionResource

Represents a reward store. Provides methods for accessing the current user;s transaction history, points balance Child resources are category folders, which contain the products

Get recent points activity with the pointsActivity parameter:
?pointsActivity☆tDate=...&endDate...

Get the current points balance with the points parameter: ?points { balance : 1000, availableBalance: 950 }


Properties

Name Returns Notes Example
title String
myTransactions List Returns a list of PointsTransaction objects which represents all transactions (both debit and credit) for the current user on this reward store
rewardName String
myBalance Integer
myAvailableBalance Integer Returns the points balance of this points system for the current user, or their primary organisation if this is an org points system
selectedGroups List Groups which have been selected for inclusion in this reward

Methods

Name Returns Notes Example
myTransactions ( start, finish ) List
isSelected ( groupName ) boolean Returns true if the given Group object is selected for this reward
myPointsInfo ( max, since ) MyRewardInfo
Show a leaderboard of top 5 points earners for last 7 days


 #set($lastWeek = $formatter.addDays( $formatter.now, -7 ) ) #set(
 $allPoints = $reward.myPointsInfo(5, $lastWeek).myPoints) #if(
 $allPoints.size() > 0 ) #foreach( $points in $allPoints ) <tr>
 <td>$points.numPoints</td>
 <td>$points.awardedDate</td>
 <td>$points.reason</td> </tr> #end #end
myPointsInfo ( max, since, to ) MyRewardInfo
Show a leaderboard of top 5 points earners for last 7 days


 #set($lastWeek = $formatter.addDays( $formatter.now, -7 ) ) #set(
 $allPoints = $reward.myPointsInfo(5, $lastWeek).myPoints) #if(
 $allPoints.size() > 0 ) #foreach( $points in $allPoints ) <tr>
 <td>$points.numPoints</td>
 <td>$points.awardedDate</td>
 <td>$points.reason</td> </tr> #end #end

Ask a question, or offer an answer